import java.util.Scanner;

public class StringDemo2 {
    public static void main(String[] args) {
        String rightName="abcdefg";
        String rightPassword="123456";

        for (int i=0;i<3;i++) {
            Scanner sc1=new Scanner(System.in);
            System.out.println("人类最强士兵请输入账号");
            String s1=sc1.next();
            Scanner sc2=new Scanner(System.in);
            System.out.println("人类最强士兵请输入密码");
            String s2=sc2.next();

            if(s1.equals(rightName)&&s2.equals(rightPassword)){
                System.out.println("人类最强士兵登录成功");
                break;
            }else{
                System.out.println("账号或密码错误,请人类最强士兵重新登录");
            }
        }
    }
}
